﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Skyper.Phone.View.Controls {
	public partial class LoginViewControl : UserControl,ILoginView {
		#region Constructor
		public LoginViewControl() {
			InitializeComponent();
		}
		#endregion
		#region Property
		public string Hostname {
			get {
				return this.textHostname.Text;
			}
			set {
				this.textHostname.Text = value;
			}
		}
		public string Password {
			get {
				return String.Empty;
			}
			set {
				
			}
		}
		public bool Remmember {
			get {
				return this.checkRemmember.IsChecked.Value;
			}
			set {
				this.checkRemmember.IsChecked = value;
			}
		}
		public bool IsBusy {
			get {
				return this.progressBusy.Visibility == System.Windows.Visibility.Visible;
			}
			set {
				this.progressBusy.Visibility = (value ? Visibility.Visible : System.Windows.Visibility.Collapsed);
			}
		}
		#endregion
		#region Events
		public event RoutedEventHandler Login {
			add {
				this.buttonLogin.Click += value;
			}
			remove {
				this.buttonLogin.Click -= value;
			}
		}
		#endregion
	}
}
